3.377 \(\int \frac{4-3 \tan (a+b x)}{\sqrt{4+3 \tan (a+b x)}} \, dx\)

Optimal. Leaf size=85 \[ \frac{13 \tanh ^{-1}\left (\frac{\tan (a+b x)+3}{\sqrt{2} \sqrt{3 \tan (a+b x)+4}}\right )}{5 \sqrt{2} b}-\frac{9 \tan ^{-1}\left (\frac{1-3 \tan (a+b x)}{\sqrt{2} \sqrt{3 \tan (a+b x)+4}}\right )}{5 \sqrt{2} b} \]

[Out]

(-9*ArcTan[(1 - 3*Tan[a + b*x])/(Sqrt[2]*Sqrt[4 + 3*Tan[a + b*x]])])/(5*Sqrt[2]*b) + (13*ArcTanh[(3 + Tan[a +
b*x])/(Sqrt[2]*Sqrt[4 + 3*Tan[a + b*x]])])/(5*Sqrt[2]*b)

________________________________________________________________________________________

Rubi [A]  time = 0.107589, antiderivative size = 85, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {3536, 3535, 203, 207} \[ \frac{13 \tanh ^{-1}\left (\frac{\tan (a+b x)+3}{\sqrt{2} \sqrt{3 \tan (a+b x)+4}}\right )}{5 \sqrt{2} b}-\frac{9 \tan ^{-1}\left (\frac{1-3 \tan (a+b x)}{\sqrt{2} \sqrt{3 \tan (a+b x)+4}}\right )}{5 \sqrt{2} b} \]

Antiderivative was successfully verified.

[In]

Int[(4 - 3*Tan[a + b*x])/Sqrt[4 + 3*Tan[a + b*x]],x]

[Out]

(-9*ArcTan[(1 - 3*Tan[a + b*x])/(Sqrt[2]*Sqrt[4 + 3*Tan[a + b*x]])])/(5*Sqrt[2]*b) + (13*ArcTanh[(3 + Tan[a +
b*x])/(Sqrt[2]*Sqrt[4 + 3*Tan[a + b*x]])])/(5*Sqrt[2]*b)

Rule 3536

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> With[{q =
 Rt[a^2 + b^2, 2]}, Dist[1/(2*q), Int[(a*c + b*d + c*q + (b*c - a*d + d*q)*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*
x]], x], x] - Dist[1/(2*q), Int[(a*c + b*d - c*q + (b*c - a*d - d*q)*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]], x
], x]] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && NeQ[2
*a*c*d - b*(c^2 - d^2), 0] && (PerfectSquareQ[a^2 + b^2] || RationalQ[a, b, c, d])

Rule 3535

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[(-2*
d^2)/f, Subst[Int[1/(2*b*c*d - 4*a*d^2 + x^2), x], x, (b*c - 2*a*d - b*d*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]
]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && EqQ[2
*a*c*d - b*(c^2 - d^2), 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{4-3 \tan (a+b x)}{\sqrt{4+3 \tan (a+b x)}} \, dx &=\frac{1}{10} \int \frac{27+9 \tan (a+b x)}{\sqrt{4+3 \tan (a+b x)}} \, dx-\frac{1}{10} \int \frac{-13+39 \tan (a+b x)}{\sqrt{4+3 \tan (a+b x)}} \, dx\\ &=-\frac{81 \operatorname{Subst}\left (\int \frac{1}{162+x^2} \, dx,x,\frac{9-27 \tan (a+b x)}{\sqrt{4+3 \tan (a+b x)}}\right )}{5 b}+\frac{1521 \operatorname{Subst}\left (\int \frac{1}{-27378+x^2} \, dx,x,\frac{-351-117 \tan (a+b x)}{\sqrt{4+3 \tan (a+b x)}}\right )}{5 b}\\ &=-\frac{9 \tan ^{-1}\left (\frac{1-3 \tan (a+b x)}{\sqrt{2} \sqrt{4+3 \tan (a+b x)}}\right )}{5 \sqrt{2} b}+\frac{13 \tanh ^{-1}\left (\frac{3+\tan (a+b x)}{\sqrt{2} \sqrt{4+3 \tan (a+b x)}}\right )}{5 \sqrt{2} b}\\ \end{align*}

Mathematica [C]  time = 0.0910901, size = 75, normalized size = 0.88 \[ \frac{(3-4 i) \tanh ^{-1}\left (\frac{\sqrt{3 \tan (a+b x)+4}}{\sqrt{4-3 i}}\right )}{\sqrt{4-3 i} b}+\frac{(3+4 i) \tanh ^{-1}\left (\frac{\sqrt{3 \tan (a+b x)+4}}{\sqrt{4+3 i}}\right )}{\sqrt{4+3 i} b} \]

Antiderivative was successfully verified.

[In]

Integrate[(4 - 3*Tan[a + b*x])/Sqrt[4 + 3*Tan[a + b*x]],x]

[Out]

((3 - 4*I)*ArcTanh[Sqrt[4 + 3*Tan[a + b*x]]/Sqrt[4 - 3*I]])/(Sqrt[4 - 3*I]*b) + ((3 + 4*I)*ArcTanh[Sqrt[4 + 3*
Tan[a + b*x]]/Sqrt[4 + 3*I]])/(Sqrt[4 + 3*I]*b)

________________________________________________________________________________________

Maple [A]  time = 0.105, size = 142, normalized size = 1.7 \begin{align*}{\frac{13\,\sqrt{2}}{20\,b}\ln \left ( 9+3\,\tan \left ( bx+a \right ) +3\,\sqrt{4+3\,\tan \left ( bx+a \right ) }\sqrt{2} \right ) }+{\frac{9\,\sqrt{2}}{10\,b}\arctan \left ({\frac{\sqrt{2}}{2} \left ( 2\,\sqrt{4+3\,\tan \left ( bx+a \right ) }+3\,\sqrt{2} \right ) } \right ) }-{\frac{13\,\sqrt{2}}{20\,b}\ln \left ( 9+3\,\tan \left ( bx+a \right ) -3\,\sqrt{4+3\,\tan \left ( bx+a \right ) }\sqrt{2} \right ) }+{\frac{9\,\sqrt{2}}{10\,b}\arctan \left ({\frac{\sqrt{2}}{2} \left ( 2\,\sqrt{4+3\,\tan \left ( bx+a \right ) }-3\,\sqrt{2} \right ) } \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((4-3*tan(b*x+a))/(4+3*tan(b*x+a))^(1/2),x)

[Out]

13/20/b*2^(1/2)*ln(9+3*tan(b*x+a)+3*(4+3*tan(b*x+a))^(1/2)*2^(1/2))+9/10/b*2^(1/2)*arctan(1/2*(2*(4+3*tan(b*x+
a))^(1/2)+3*2^(1/2))*2^(1/2))-13/20/b*2^(1/2)*ln(9+3*tan(b*x+a)-3*(4+3*tan(b*x+a))^(1/2)*2^(1/2))+9/10/b*2^(1/
2)*arctan(1/2*(2*(4+3*tan(b*x+a))^(1/2)-3*2^(1/2))*2^(1/2))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\int \frac{3 \, \tan \left (b x + a\right ) - 4}{\sqrt{3 \, \tan \left (b x + a\right ) + 4}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4-3*tan(b*x+a))/(4+3*tan(b*x+a))^(1/2),x, algorithm="maxima")

[Out]

-integrate((3*tan(b*x + a) - 4)/sqrt(3*tan(b*x + a) + 4), x)

________________________________________________________________________________________

Fricas [B]  time = 1.26366, size = 2720, normalized size = 32. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4-3*tan(b*x+a))/(4+3*tan(b*x+a))^(1/2),x, algorithm="fricas")

[Out]

1/58500*25^(1/4)*(44*b^2*sqrt(b^(-4)) + 125)*sqrt(-11000*b^2*sqrt(b^(-4)) + 31250)*(b^(-4))^(1/4)*log(25/39*(4
875*b^2*sqrt(b^(-4))*cos(b*x + a) + 25^(1/4)*(5*b^3*sqrt(b^(-4))*cos(b*x + a) + 8*b*cos(b*x + a))*sqrt(-11000*
b^2*sqrt(b^(-4)) + 31250)*sqrt((4*cos(b*x + a) + 3*sin(b*x + a))/cos(b*x + a))*(b^(-4))^(1/4) + 3900*cos(b*x +
 a) + 2925*sin(b*x + a))/cos(b*x + a)) - 1/58500*25^(1/4)*(44*b^2*sqrt(b^(-4)) + 125)*sqrt(-11000*b^2*sqrt(b^(
-4)) + 31250)*(b^(-4))^(1/4)*log(25/39*(4875*b^2*sqrt(b^(-4))*cos(b*x + a) - 25^(1/4)*(5*b^3*sqrt(b^(-4))*cos(
b*x + a) + 8*b*cos(b*x + a))*sqrt(-11000*b^2*sqrt(b^(-4)) + 31250)*sqrt((4*cos(b*x + a) + 3*sin(b*x + a))/cos(
b*x + a))*(b^(-4))^(1/4) + 3900*cos(b*x + a) + 2925*sin(b*x + a))/cos(b*x + a)) - 1/125*25^(1/4)*sqrt(-11000*b
^2*sqrt(b^(-4)) + 31250)*(b^(-4))^(1/4)*arctan(1/73125*25^(3/4)*sqrt(1/39)*(5*b^5*sqrt(b^(-4)) + 8*b^3)*sqrt(-
11000*b^2*sqrt(b^(-4)) + 31250)*sqrt((4875*b^2*sqrt(b^(-4))*cos(b*x + a) + 25^(1/4)*(5*b^3*sqrt(b^(-4))*cos(b*
x + a) + 8*b*cos(b*x + a))*sqrt(-11000*b^2*sqrt(b^(-4)) + 31250)*sqrt((4*cos(b*x + a) + 3*sin(b*x + a))/cos(b*
x + a))*(b^(-4))^(1/4) + 3900*cos(b*x + a) + 2925*sin(b*x + a))/cos(b*x + a))*(b^(-4))^(3/4) - 1/14625*25^(3/4
)*(5*b^5*sqrt(b^(-4)) + 8*b^3)*sqrt(-11000*b^2*sqrt(b^(-4)) + 31250)*sqrt((4*cos(b*x + a) + 3*sin(b*x + a))/co
s(b*x + a))*(b^(-4))^(3/4) - 4/3*b^2*sqrt(b^(-4)) - 5/3) - 1/125*25^(1/4)*sqrt(-11000*b^2*sqrt(b^(-4)) + 31250
)*(b^(-4))^(1/4)*arctan(1/73125*25^(3/4)*sqrt(1/39)*(5*b^5*sqrt(b^(-4)) + 8*b^3)*sqrt(-11000*b^2*sqrt(b^(-4))
+ 31250)*sqrt((4875*b^2*sqrt(b^(-4))*cos(b*x + a) - 25^(1/4)*(5*b^3*sqrt(b^(-4))*cos(b*x + a) + 8*b*cos(b*x +
a))*sqrt(-11000*b^2*sqrt(b^(-4)) + 31250)*sqrt((4*cos(b*x + a) + 3*sin(b*x + a))/cos(b*x + a))*(b^(-4))^(1/4)
+ 3900*cos(b*x + a) + 2925*sin(b*x + a))/cos(b*x + a))*(b^(-4))^(3/4) - 1/14625*25^(3/4)*(5*b^5*sqrt(b^(-4)) +
 8*b^3)*sqrt(-11000*b^2*sqrt(b^(-4)) + 31250)*sqrt((4*cos(b*x + a) + 3*sin(b*x + a))/cos(b*x + a))*(b^(-4))^(3
/4) + 4/3*b^2*sqrt(b^(-4)) + 5/3)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \int \frac{3 \tan{\left (a + b x \right )}}{\sqrt{3 \tan{\left (a + b x \right )} + 4}}\, dx - \int - \frac{4}{\sqrt{3 \tan{\left (a + b x \right )} + 4}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4-3*tan(b*x+a))/(4+3*tan(b*x+a))**(1/2),x)

[Out]

-Integral(3*tan(a + b*x)/sqrt(3*tan(a + b*x) + 4), x) - Integral(-4/sqrt(3*tan(a + b*x) + 4), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int -\frac{3 \, \tan \left (b x + a\right ) - 4}{\sqrt{3 \, \tan \left (b x + a\right ) + 4}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4-3*tan(b*x+a))/(4+3*tan(b*x+a))^(1/2),x, algorithm="giac")

[Out]

integrate(-(3*tan(b*x + a) - 4)/sqrt(3*tan(b*x + a) + 4), x)